<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org"
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="layout :: htmlhead" th:with="title='category2管理'"></head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!--头-->
    <div th:replace="fragments/head :: header"></div>

    <div class="layui-body" style="margin: 1%">

        <form id="category2Search" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <div class="layui-form-item">
                <label class="layui-form-label">服务名称</label>
                <div class="layui-input-inline">
                    <input id="category2Name" name="category2Name" autocomplete="off" class="layui-input" type="text"/>
                </div>
                <label class="layui-form-label">所属类型</label>
                <div class="layui-input-inline">
                    <select name="category10Id"  id="category10Id" >
                        <option value="">请选择...</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">

                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    <button class="layui-btn"  lay-submit="" lay-filter="searchSubmit">提交</button>
                </div>
            </div>
        </form>

        <!--<hr class="layui-bg-blue"/>-->
        <hr class="layui-bg-black"/>

        <button class="layui-btn layui-btn-normal" onclick="addCategory2()">新增服务</button>



        <table id="category2List" lay-filter="category2Table"></table>

        <script type="text/html" id="optBar">
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
            {{#  if(d.category2Label == '1'){ }}
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="recover">恢复</a>
            {{#  } else { }}
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
            {{#  } }}
        </script>
    </div>


    <!--添加或编辑用户-->
    <div id="setCategory2" class="layer_self_wrap" style="width:500px;display:none;">
        <form id="category2Form" class="layui-form layui-form-pane" method="post" action="" style="margin-top: 20px;">
            <input id="pageNum" type="hidden" name="pageNum"/>
            <input id="category2Id" type="hidden" name="category2Id"/>
            <div class="layui-form-item">
                <label class="layui-form-label">服务名</label>
                <div class="layui-input-inline">
                    <input id="category2Name0" name="category2Name" lay-verify="required" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-inline">
                    <input id="category2Remark" name="category2Remark" lay-verify="required" autocomplete="off" class="layui-input" type="text"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属类别</label>
                <div class="layui-input-inline">
                    <select name="category10Id"  id="category10Id0" >
                        <option value="">请选择...</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">价格</label>
                <div class="layui-input-inline">
                    <input id="recommendedPrice" name="recommendedPrice" lay-verify="required" autocomplete="off" class="layui-input" type="text" onkeyup="this.value=this.value.replace(/\D/g,'')"
                           onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block" style="margin-left: 10px;">
                    <button class="layui-btn"  lay-submit="" lay-filter="category2Submit">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>

    <!--底部-->
    <div th:replace="fragments/footer :: footer"></div>

    <script src="/js/category2/category2List.js"></script>

</div>
</body>
</html>